#! usr/bin/env python
# this script used to count bp numbers in a fastafile
def cntbpnum(fastafile):
	f = open(fastafile, 'r')
	str = f.read().split(os.linesep)[:-1]
	new = []
	for i in xrange(len(str)):
		if '>' in str[i]:
			str[i] = ''
		else:
			new.append(str[i])
	strs = ''.join(new)
	print  fastafile, '\t', len(strs)
	
if __name__ == '__main__':
	import os,sys
	if len(sys.argv) == 1:
		print "usage: python cntbpnum.py fastafile"
	else:
		cntbpnum(sys.argv[1])
		
